# Add wage into RRC_county_emp_tx.txt. 


BEGIN {
  FS = ","
  OFS = ","
  while ((getline line < "/home/huizi/HOLA/research/Green_jobs/data/TX/county_wage_tx.txt") > 0) {
    split (line, x)
    county = x[1]
    year = x[2]
    wage[county,year] = x[3]
  }
}

{
  if ($2 SUBSEP $3 in wage)
    print $0, wage[$2,$3]
  else {
    print NR, $2, "Error"
    exit
  }
}
